import request from '@/config/axios'

// 产品查找清单 VO
export interface ProductSearchListVO {
  id: number // 序号
  equipmentCode: string // 设备编码
  productName: string // 产品名称
  productModel: string // 产品型号
  softwareVersion: string // 软件版本
  hardwareVersion: string // 硬件版本
  projectNo: string // 项目号
  projectName: string // 项目名称
  powerStation: string // 所在电站
  unitUsed: string // 所用机组
  deliveryTime: Date // 交付时间
}

// 产品查找清单 API
export const ProductSearchListApi = {
  // 查询产品查找清单分页
  getProductSearchListPage: async (params: any) => {
    return await request.get({ url: `/om/product-search-list/page`, params })
  },

  // 查询产品查找清单详情
  getProductSearchList: async (id: number) => {
    return await request.get({ url: `/om/product-search-list/get?id=` + id })
  },

  // 新增产品查找清单
  createProductSearchList: async (data: ProductSearchListVO) => {
    return await request.post({ url: `/om/product-search-list/create`, data })
  },

  // 修改产品查找清单
  updateProductSearchList: async (data: ProductSearchListVO) => {
    return await request.put({ url: `/om/product-search-list/update`, data })
  },

  // 删除产品查找清单
  deleteProductSearchList: async (id: number) => {
    return await request.delete({ url: `/om/product-search-list/delete?id=` + id })
  },

  // 导出产品查找清单 Excel
  exportProductSearchList: async (params) => {
    return await request.download({ url: `/om/product-search-list/export-excel`, params })
  },
}